/*
 * HomeUI.java
 *
 * Created on 09/10/2011, 20:07:19
 */
package com.bcc.airlines.ui;

import com.bcc.airlines.patterns.Observador;
import java.awt.Color;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.DateFormat;
import java.util.Date;
import javax.swing.Timer;

/**
 *
 * @author Serginho
 */
public class HomeUI extends javax.swing.JPanel implements Observador {

    public HomeUI(MainUI main) {
        this.mainUi = main;
        initComponents();
        initTimer();
        
        main.getFachada().registerDatabaseObserver(this);
        atualiza();
    }

    /**
     * Mostra o modulo chamado
     * @param module 
     */
    private void Switch(String module) {
        mainUi.select(module);
    }
    
    /**
     * Inicia o temporizador
     */
    private void initTimer() {
        Timer t = new Timer(500, new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                DateFormat fmt = DateFormat.getDateInstance(DateFormat.LONG);
                dataLabel.setText(fmt.format(new Date() ) );

                fmt = DateFormat.getTimeInstance(DateFormat.MEDIUM);
                timeLabel.setText(fmt.format(new Date() ) );
            }
        });

        t.start();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        ticketIcon = new javax.swing.JPanel();
        ticketLabel = new javax.swing.JLabel();
        airplanesIcon = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        weatherIcon = new javax.swing.JPanel();
        jLabel9 = new javax.swing.JLabel();
        airportsIcon = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        flightsIcon = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        configIcon = new javax.swing.JPanel();
        dataLabel = new javax.swing.JLabel();
        timeLabel = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();

        setBackground(new java.awt.Color(255, 255, 255));
        setMaximumSize(new java.awt.Dimension(859, 398));
        setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 5, 50));

        jPanel1.setOpaque(false);

        ticketIcon.setBackground(new java.awt.Color(51, 153, 255));
        ticketIcon.setMaximumSize(new java.awt.Dimension(194, 184));
        ticketIcon.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                ticketIconMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                ticketIconMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                ticketIconMouseExited(evt);
            }
        });

        ticketLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        ticketLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bcc/airlines/ui/images/ticket.png"))); // NOI18N
        ticketLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                ticketLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                ticketLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                ticketLabelMouseExited(evt);
            }
        });

        org.jdesktop.layout.GroupLayout ticketIconLayout = new org.jdesktop.layout.GroupLayout(ticketIcon);
        ticketIcon.setLayout(ticketIconLayout);
        ticketIconLayout.setHorizontalGroup(
            ticketIconLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(ticketIconLayout.createSequentialGroup()
                .addContainerGap()
                .add(ticketLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)
                .addContainerGap())
        );
        ticketIconLayout.setVerticalGroup(
            ticketIconLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(ticketIconLayout.createSequentialGroup()
                .addContainerGap()
                .add(ticketLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 160, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(13, Short.MAX_VALUE))
        );

        airplanesIcon.setBackground(new java.awt.Color(255, 204, 0));
        airplanesIcon.setMaximumSize(new java.awt.Dimension(348, 194));
        airplanesIcon.setPreferredSize(new java.awt.Dimension(348, 194));
        airplanesIcon.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                airplanesIconMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                airplanesIconMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                airplanesIconMouseExited(evt);
            }
        });

        jLabel2.setFont(new java.awt.Font("Lucida Sans", 1, 24)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setText("Aeronaves");

        jLabel3.setFont(new java.awt.Font("Lucida Sans", 0, 24)); // NOI18N
        jLabel3.setForeground(new java.awt.Color(255, 255, 255));
        jLabel3.setText("e");

        jLabel4.setFont(new java.awt.Font("Lucida Sans", 1, 24)); // NOI18N
        jLabel4.setForeground(new java.awt.Color(255, 255, 255));
        jLabel4.setText("Tripulantes");

        org.jdesktop.layout.GroupLayout airplanesIconLayout = new org.jdesktop.layout.GroupLayout(airplanesIcon);
        airplanesIcon.setLayout(airplanesIconLayout);
        airplanesIconLayout.setHorizontalGroup(
            airplanesIconLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(airplanesIconLayout.createSequentialGroup()
                .addContainerGap()
                .add(airplanesIconLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel2)
                    .add(jLabel3)
                    .add(jLabel4))
                .addContainerGap(192, Short.MAX_VALUE))
        );
        airplanesIconLayout.setVerticalGroup(
            airplanesIconLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(airplanesIconLayout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel2)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel3)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel4)
                .addContainerGap(74, Short.MAX_VALUE))
        );

        weatherIcon.setBackground(new java.awt.Color(204, 204, 204));
        weatherIcon.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                weatherIconMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                weatherIconMouseExited(evt);
            }
        });

        jLabel9.setFont(new java.awt.Font("Lucida Sans", 0, 24)); // NOI18N
        jLabel9.setForeground(new java.awt.Color(255, 255, 255));
        jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bcc/airlines/ui/images/cloud.png"))); // NOI18N

        org.jdesktop.layout.GroupLayout weatherIconLayout = new org.jdesktop.layout.GroupLayout(weatherIcon);
        weatherIcon.setLayout(weatherIconLayout);
        weatherIconLayout.setHorizontalGroup(
            weatherIconLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, weatherIconLayout.createSequentialGroup()
                .addContainerGap(56, Short.MAX_VALUE)
                .add(jLabel9)
                .add(43, 43, 43))
        );
        weatherIconLayout.setVerticalGroup(
            weatherIconLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(weatherIconLayout.createSequentialGroup()
                .add(45, 45, 45)
                .add(jLabel9)
                .addContainerGap(53, Short.MAX_VALUE))
        );

        airportsIcon.setBackground(new java.awt.Color(255, 51, 51));
        airportsIcon.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                airportsIconMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                airportsIconMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                airportsIconMouseExited(evt);
            }
        });

        jLabel5.setFont(new java.awt.Font("Lucida Sans", 1, 24)); // NOI18N
        jLabel5.setForeground(new java.awt.Color(255, 255, 255));
        jLabel5.setText("Aeroportos");

        jLabel6.setFont(new java.awt.Font("Lucida Sans", 0, 24)); // NOI18N
        jLabel6.setForeground(new java.awt.Color(255, 255, 255));
        jLabel6.setText("Status");

        org.jdesktop.layout.GroupLayout airportsIconLayout = new org.jdesktop.layout.GroupLayout(airportsIcon);
        airportsIcon.setLayout(airportsIconLayout);
        airportsIconLayout.setHorizontalGroup(
            airportsIconLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(airportsIconLayout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel5)
                .add(12, 12, 12)
                .add(jLabel6)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        airportsIconLayout.setVerticalGroup(
            airportsIconLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(airportsIconLayout.createSequentialGroup()
                .addContainerGap()
                .add(airportsIconLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel6)
                    .add(jLabel5))
                .addContainerGap(144, Short.MAX_VALUE))
        );

        flightsIcon.setBackground(new java.awt.Color(102, 51, 255));
        flightsIcon.setPreferredSize(new java.awt.Dimension(326, 194));
        flightsIcon.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                flightsIconMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                flightsIconMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                flightsIconMouseExited(evt);
            }
        });

        jLabel7.setFont(new java.awt.Font("Lucida Sans", 0, 24)); // NOI18N
        jLabel7.setForeground(new java.awt.Color(255, 255, 255));
        jLabel7.setText("Voos");

        jLabel8.setFont(new java.awt.Font("Lucida Sans", 0, 24)); // NOI18N
        jLabel8.setForeground(new java.awt.Color(255, 255, 255));
        jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bcc/airlines/ui/images/flight.png"))); // NOI18N

        org.jdesktop.layout.GroupLayout flightsIconLayout = new org.jdesktop.layout.GroupLayout(flightsIcon);
        flightsIcon.setLayout(flightsIconLayout);
        flightsIconLayout.setHorizontalGroup(
            flightsIconLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, flightsIconLayout.createSequentialGroup()
                .addContainerGap(229, Short.MAX_VALUE)
                .add(jLabel8)
                .addContainerGap())
            .add(flightsIconLayout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel7)
                .addContainerGap(290, Short.MAX_VALUE))
        );
        flightsIconLayout.setVerticalGroup(
            flightsIconLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, flightsIconLayout.createSequentialGroup()
                .addContainerGap(55, Short.MAX_VALUE)
                .add(jLabel8)
                .addContainerGap())
            .add(flightsIconLayout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel7)
                .addContainerGap(144, Short.MAX_VALUE))
        );

        configIcon.setBackground(new java.awt.Color(51, 102, 0));

        dataLabel.setForeground(new java.awt.Color(255, 255, 255));
        dataLabel.setText("Data");

        timeLabel.setFont(new java.awt.Font("Ubuntu", 0, 40)); // NOI18N
        timeLabel.setForeground(new java.awt.Color(255, 255, 255));
        timeLabel.setText("Hora");

        jLabel10.setFont(new java.awt.Font("Lucida Sans", 0, 24)); // NOI18N
        jLabel10.setForeground(new java.awt.Color(255, 255, 255));
        jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bcc/airlines/ui/images/clock.png"))); // NOI18N

        org.jdesktop.layout.GroupLayout configIconLayout = new org.jdesktop.layout.GroupLayout(configIcon);
        configIcon.setLayout(configIconLayout);
        configIconLayout.setHorizontalGroup(
            configIconLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, configIconLayout.createSequentialGroup()
                .addContainerGap()
                .add(configIconLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, dataLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, timeLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel10))
                .addContainerGap())
        );
        configIconLayout.setVerticalGroup(
            configIconLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, configIconLayout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel10, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 87, Short.MAX_VALUE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(timeLabel)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(dataLabel)
                .addContainerGap())
        );

        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(ticketIcon, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(airplanesIcon, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(airportsIcon, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
                        .add(flightsIcon, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 360, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(weatherIcon, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(configIcon, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(ticketIcon, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(airplanesIcon, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 185, Short.MAX_VALUE)
                    .add(airportsIcon, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(flightsIcon, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 185, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(weatherIcon, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(configIcon, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(129, Short.MAX_VALUE))
        );

        jPanel1Layout.linkSize(new java.awt.Component[] {airplanesIcon, airportsIcon, configIcon, flightsIcon, ticketIcon, weatherIcon}, org.jdesktop.layout.GroupLayout.VERTICAL);

        add(jPanel1);
    }// </editor-fold>//GEN-END:initComponents

private void ticketIconMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ticketIconMouseClicked
    Switch("Tickets");
    toDark(ticketIcon);
}//GEN-LAST:event_ticketIconMouseClicked

private void airplanesIconMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_airplanesIconMouseClicked
    Switch("Airplanes");
    toBright(airplanesIcon);
}//GEN-LAST:event_airplanesIconMouseClicked

private void airportsIconMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_airportsIconMouseClicked
    Switch("Airports");
    toDark(airportsIcon);
}//GEN-LAST:event_airportsIconMouseClicked

private void flightsIconMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_flightsIconMouseClicked
    Switch("Flights");
    toDark(flightsIcon);
}//GEN-LAST:event_flightsIconMouseClicked

private void ticketLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ticketLabelMouseClicked
    Switch("Tickets");
    toDark(ticketIcon);
}//GEN-LAST:event_ticketLabelMouseClicked

private void ticketIconMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ticketIconMouseEntered
    toBright((Component) evt.getSource());
}//GEN-LAST:event_ticketIconMouseEntered

private void ticketIconMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ticketIconMouseExited
    toDark((Component) evt.getSource());
}//GEN-LAST:event_ticketIconMouseExited

private void airplanesIconMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_airplanesIconMouseEntered
    toDark((Component) evt.getSource());
}//GEN-LAST:event_airplanesIconMouseEntered

private void airplanesIconMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_airplanesIconMouseExited
    toBright((Component) evt.getSource());
}//GEN-LAST:event_airplanesIconMouseExited

private void weatherIconMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_weatherIconMouseEntered
    toDark((Component) evt.getSource());
}//GEN-LAST:event_weatherIconMouseEntered

private void weatherIconMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_weatherIconMouseExited
    toBright((Component) evt.getSource());
}//GEN-LAST:event_weatherIconMouseExited

private void airportsIconMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_airportsIconMouseEntered
    toBright((Component) evt.getSource());
}//GEN-LAST:event_airportsIconMouseEntered

private void flightsIconMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_flightsIconMouseEntered
    toBright((Component) evt.getSource());
}//GEN-LAST:event_flightsIconMouseEntered

private void airportsIconMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_airportsIconMouseExited
    toDark((Component) evt.getSource());
}//GEN-LAST:event_airportsIconMouseExited

private void flightsIconMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_flightsIconMouseExited
    toDark((Component) evt.getSource());
}//GEN-LAST:event_flightsIconMouseExited

private void ticketLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ticketLabelMouseEntered
    toBright(ticketIcon);
}//GEN-LAST:event_ticketLabelMouseEntered

private void ticketLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ticketLabelMouseExited
    toDark(ticketIcon);
}//GEN-LAST:event_ticketLabelMouseExited

    /**
     * escure o background
     * @param c 
     */
    private void toDark(Component c) {
        c.setBackground(dark_background);
    }

    /**
     * clareia o background
     * @param c 
     */
    private void toBright(Component c) {
        c.setBackground(bright_background);
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel airplanesIcon;
    private javax.swing.JPanel airportsIcon;
    private javax.swing.JPanel configIcon;
    private javax.swing.JLabel dataLabel;
    private javax.swing.JPanel flightsIcon;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel ticketIcon;
    private javax.swing.JLabel ticketLabel;
    private javax.swing.JLabel timeLabel;
    private javax.swing.JPanel weatherIcon;
    // End of variables declaration//GEN-END:variables
    private MainUI mainUi;
    private Color dark_background = new Color(33, 33, 33);
    private Color bright_background = new Color(98, 98, 98);

    @Override
    public void atualiza() {
        
    }
}
